package com.ayit.car.mapper;

import com.ayit.car.pojo.VehicleExteriorColors;
import com.ayit.car.pojo.VehicleInteriorColors;
import com.ayit.car.pojo.Vehicles;
import com.ayit.car.pojo.dto.VehiclesPageQueryDTO;
import com.ayit.car.pojo.vo.VehiclesVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

/**
* @author 为王下葬
* @description 针对表【vehicles(具体车辆表)】的数据库操作Mapper
* @createDate 2024-06-24 18:12:48
* @Entity com.ayit.car.pojo.VehiclesVO
*/
@Mapper
public interface VehiclesMapper extends BaseMapper<Vehicles> {

    /**
     * 批量添加车辆外色
     * @param exteriorColors
     */
    void addBatchExteriorColors(ArrayList<VehicleExteriorColors> exteriorColors);

    void addBatchInteriorColors(ArrayList<VehicleInteriorColors> interiorColors);

    /**
     * 分页查询车辆信息
     * @param vehiclesPageQueryDTO
     * @return
     */
    Page<VehiclesVO> pageQuery(VehiclesPageQueryDTO vehiclesPageQueryDTO);

    @Select("select * from vehicles where id = #{id}")
    VehiclesVO getCarInfo(Long id);
}




